{% if plugin_octoprint_nanny_config != none and  plugin_octoprint_nanny_config.device is defined %}
<span class="janus-stream-app">
    <janus-stream 
        device-id="{{ plugin_octoprint_nanny_config.device.id }}"
        offline-image="plugin/octoprint_nanny/static/img/sleeping.png"
        config-type="edge" />
</span>
{% endif %}

{% if plugin_octoprint_nanny_config and plugin_octoprint_nanny_config.api is defined %}
<script type="text/javascript">
window.PRINTNANNY_API_TOKEN = "{{ plugin_octoprint_nanny_config.api.bearer_access_token }}"
window.PRINTNANNY_API_PROXY = "{{ plugin_octoprint_nanny_config.printnanny_cloud_proxy.url }}"
</script>
<script type="text/javascript" src="{{ plugin_octoprint_nanny_config.api.static_url }}vue/js/printnanny-vendor.js"></script>
<script type="text/javascript" src="{{ plugin_octoprint_nanny_config.api.static_url }}vue/js/printnanny-janusStream.js"></script>

{% endif %}